/**
 * 
 */
package com.google.code.sip.ucenter.dao.mongo;

import java.util.List;

import com.google.code.sip.core.dao.mongo.GenericMongoDao;
import com.google.code.sip.ucenter.dao.UserCountDao;
import com.google.code.sip.ucenter.model.User;
import com.google.code.sip.ucenter.model.UserCount;

/**
 * @author Liuye
 * 
 */

public class UserCountDaoImpl extends GenericMongoDao<UserCount, String>
		implements UserCountDao {
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.google.code.sip.ucenter.dao.mongo.UserCountDao#getByUser(com.google.code
	 * .ucenter.model.User)
	 */
	public UserCount getByUser(User user) {
		return getByProperty("user", user);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.google.code.sip.ucenter.dao.mongo.UserCountDao#getByUsers(java.util.List)
	 */
	public List<UserCount> getByUsers(List<User> users) {
		return this.findWithIn("user", users);
	}
}
